package com.atguigu.homework.exer.e1;

import org.junit.Test;


/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/13 16:49
 * @注释
 */
public class EmployeeTest {
    Employee[] arr;
    /*@Before
    public void before(){
        ArrayTools.print(arr);
    }*/
    @Test
    public void test(){
        Employee emp = new Employee(2,"悟空",5000.5,50);
        Employee emp1 = new Employee(1,"八戒",4000.5,60);
        Employee emp2 = new Employee(5,"沙僧",3000.5,70);
        Employee emp3 = new Employee(3,"唐僧",2000.5,37);
        Employee emp4 = new Employee(4,"白龙",1000.5,80);

        Employee[] arr = new Employee[]{emp,emp1,emp2,emp3,emp4};

        System.out.println("排序前:");
        ArrayTools.print(arr);
        //排序
        ArrayTools.sort(arr);

        System.out.println("排序后:");
        ArrayTools.print(arr);
    }
    /*@After
    public void after(){
        ArrayTools.print(arr);
    }*/
}
